package com.health.db.dao.user.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.health.db.dao.ServiceInterface;
import com.health.db.dao.user.ITrainingEnterDao;
import com.health.db.mapper.TrainingEnterMapper;
import com.health.db.model.TrainingEnter;
import com.health.db.model.TrainingEnterExample;

/**
 * 培训报名表
 * @author YC
 *
 */
@Component("trainingEnterDao")
public class TrainingEnterDaoImpl extends ServiceInterface implements
		ITrainingEnterDao {
	
	@Autowired
	TrainingEnterMapper trainingEnterMapper;

	@Override
	public int insert(TrainingEnter record) {
		// TODO Auto-generated method stub
		int executNum = trainingEnterMapper.insert(record);
		
		return executNum;
	}

	@Override
	public List<TrainingEnter> selectByExample(TrainingEnterExample example) {
		// TODO Auto-generated method stub
		List<TrainingEnter> list = trainingEnterMapper.selectByExample(example);
		
		return list;
	}

	@Override
	public TrainingEnter selectByPrimaryKey(Long id) {
		// TODO Auto-generated method stub
		TrainingEnter trainingEnter= trainingEnterMapper.selectByPrimaryKey(id);
		return trainingEnter;
	}

	@Override
	public int updateByPrimaryKeySelective(TrainingEnter record) {
		// TODO Auto-generated method stub
		int executNum = trainingEnterMapper.updateByPrimaryKeySelective(record);
		return executNum;
	}

	@Override
	public int updateByPrimaryKey(TrainingEnter record) {
		// TODO Auto-generated method stub
		int executNum = trainingEnterMapper.updateByPrimaryKey(record);
		return executNum;
	}

	public TrainingEnterMapper getTrainingEnterMapper() {
		return trainingEnterMapper;
	}

	public void setTrainingEnterMapper(TrainingEnterMapper trainingEnterMapper) {
		this.trainingEnterMapper = trainingEnterMapper;
	}

	@Override
	public long countByExample(TrainingEnterExample example) {
		// TODO Auto-generated method stub
		
		long queryNum = trainingEnterMapper.countByExample(example);
		return queryNum;
	}

	
}
